From: Keir Fraser Date: Thu, 2 Oct 2008 10:32:08 +0000 (+0100) Subject: xc_ptrace: Allow gdbserver to connect to a guest before APs are X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14101^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=668349f38be79d2bd197ff968d728090f6d14faa;p=xen.git xc_ptrace: Allow gdbserver to connect to a guest before APs are brought online. Signed-off-by: Kip Macy Signed-off-by: Keir Fraser --- diff --git a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c index 09d5c656d5..fa6c3a0ad1 100644 --- a/tools/libxc/xc_ptrace.c +++ b/tools/libxc/xc_ptrace.c @@ -112,17 +112,16 @@ static int get_online_cpumap(int xc_handle, struct xen_domctl_getdomaininfo *d, uint64_t *cpumap) { - int i, online, retval; + int i, online; *cpumap = 0; for (i = 0; i <= d->max_vcpu_id; i++) { - if ((retval = fetch_regs(xc_handle, i, &online))) - return retval; + fetch_regs(xc_handle, i, &online); if (online) *cpumap |= (1 << i); } - - return 0; + + return (*cpumap == 0) ? -1 : 0; } /*